package com.jiao.domain.DTO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegisterDto {

    /*
    * 两种配置方式 NotNull，NotEmpty：具体的显示数据根据message来的
    * */
    //用户名
    @NotNull(message = "用户名不能为空")
    @NotEmpty
    private String userName;

    //昵称
    @NotNull(message = "昵称不能为空")
    @NotEmpty
    private String nickName;

    //密码
    @NotNull(message = "密码不能为空")
    @NotEmpty(message = "密码不能为空")
    private String password;

    //邮箱
    @NotNull(message = "邮箱不能为空")
    @NotEmpty
    private String email;
}
